#include <QCoreApplication>  // 一个函数多返回值的问题  C++的函数“参数引用”
#include <iostream>
#include "Mvvar.h"

int main(int argc, char *argv[])
{
   int size = 10;
   double arry[10];
   for(auto i = 0; i < size; ++i){
       arry[i] = i * 0.2;
   }
   double mean = 0.0;
   double variance = 0.0;
//   mean, variance此时就是实际参数，本身在stack(栈)上有自己的存储地址，结果就会被写到这个地址上~
   mvvar(arry, mean, variance); //这里传“址”不传“值”！
   std::cout << "Mean is " << mean << std::endl << "Variance is " << variance << std::endl;
   return 0;
}
